package com.demo;

import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;
import org.noear.weed.mongo.MgContext;

/**
 * @author noear 2022/6/20 created
 */
@Configuration
public class Config {
    @Bean
    public MgContext mongo(@Inject("${mongodb.uri}") String uri) {
        return new MgContext(uri, "tasks");
    }
}
